feat: Migrate geographies to API v2 alpha#658
Merged
anth-volk merged 17 commits intomove-to-api-v2from Feb 17, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Add V2 regions API client (fetchRegions, fetchRegionByCode) - Add RegionsAdapter to convert V2 API response to frontend format - Update useRegions hook to fetch from V2 API using React Query - Remove year parameter from useRegions/useRegionsList (API handles versioning) - Update all call sites to use new single-argument signature - Remove unused CURRENT_YEAR imports from updated files - Add regionKeys to queryKeys for React Query cache management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow PR checks to run for PRs targeting any branch, not just main/master. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
edbc27f to
6d0545d
Compare
After rebasing onto move-to-api-v2 (which includes the policy v2 migration), countryId became required on UserPolicy and ShareableUserPolicy. Updated all fixtures and useSaveSharedReport to include countryId. Also ran Prettier on files that needed formatting after the rebase. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The page now uses useUserId() (from the policy v2 migration) instead of MOCK_USER_ID directly. Added mock to return MOCK_USER_ID so the test assertion matches. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #657
Summary
Migrate geography/region functionality to use the new API v2 alpha regions endpoint, removing user-specific geography associations.
Dependencies
This PR requires the following to be merged first:
Changes
/regions/endpoint instead of user-scoped APIsUserGeographicStorepatternRegioninstead ofUserGeographyPopulationTest plan
🤖 Generated with Claude Code